<!--
 * @Description:
 * @Author: dh
 * @Date: 2022-01-21 13:41:19
 * @LastEditors: dh
 * @LastEditTime: 2022-11-30 10:56:46
-->
<template>
	<div>
		<Child />
	</div>
</template>

<script lang="ts">
import { onMounted } from 'vue';
import Child from './chiild.vue';
import { getCurrentInstance } from 'vue';

export default {
	components: { Child },
	setup() {
		const instance = getCurrentInstance();
		onMounted(() => {
			instance?.proxy?.$bus.on('msg', function () {
				alert('mitt通讯');
			});
		});

		return {};
	},
};
</script>
